﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ExtraClub.Domain.Entity {
    public class WebPage {
        public string Id { get; set; }
        public string Title { get; set; }
        public string Description { get; set; }
        public string Url { get; set; }
        public string BgColor { get; set; }

        public static WebPage GetCurrentPage() {
            return SiteManager.BuildWebPageByUrl(CurrentPageUrl());
        }
        private static string CurrentPageUrl() {
            string ret = RewriteContext.Current.Params["p"];
            if (string.IsNullOrEmpty(ret)) {
                ret = SiteManager.GetHomePage();
            }
            return ret.ToLower();
        }
     }
}
